   <script src="<?=base_url().$this->config->item('FAL_assets_shared').'/'.$this->config->item('FAL_js');?>/calendar.js" type="text/javascript"></script>
   <script src="<?=base_url().$this->config->item('FAL_assets_shared').'/'.$this->config->item('FAL_js');?>/calendar-setup.js" type="text/javascript"></script>
     <script src="<?=base_url().$this->config->item('FAL_assets_shared').'/'.$this->config->item('FAL_js');?>/calendar-en.js" type="text/javascript"></script>
  
   <link rel="stylesheet" type="text/css" href="<?=base_url().$this->config->item('FAL_assets_shared').'/'.$this->config->item('FAL_css');?>/skins/aqua/theme.css" />
    
  <?=form_open($this->uri->uri_string()); ?>
  <table>
		
       <tr>
      <td><?=$this->lang->line('CNC_manage_servicedate')?></td>
	                <td>
	                 <?=form_input(array('id'=>'date',
                     'name'=>'date',
                     'value' =>'',
                     'size'  => '30')); ?>
                    <button type="reset" id="f_trigger_b"> <img src="<?=base_url().$this->config->item('FAL_assets_shared').'/'.$this->config->item('FAL_images');?>/calender.gif" style="border:0px;" /></button>
                    <script type="text/javascript">
        Calendar.setup({
        inputField     :    "date",      // id of the input field
        ifFormat       :    "%m/%d/%Y ", // format of the input field
       
        button         :    "f_trigger_b",   // trigger for the calendar (button ID)
        singleClick    :    false,           // double-click mode
        step           :    1                // show all years in drop-down boxes (instead of every other year as default)
            });
			</script>
        </td>
       
        <td><input type="submit" value="Search"></input></td>
        
        </tr>
						
</table>

<?=form_close();?>
<?
 if(!empty($search_results))
 {
  $count = 1;
 	foreach ($search_results as $result)
 	{
 		if(trim(strtolower($result->servicetype)) == "plumber")
 		{
 	 if($count ==1) {	?>
 	<h2><?=ucfirst($result->servicetype); ?></h2><?php $count++ ; } ?>
 	<div> <span style="font-weight: bold"><?=$this->lang->line('CNC_manage_servicedate')?></span>
 	<?=$result->date ?><br/> <span style="font-weight: bold"><?=$this->lang->line('CNC_select_details')?></span> <?=ucfirst($result->details); ?><br/><span style="font-weight: bold"><?=$this->lang->line('CNC_select_status')?></span> <?=ucfirst($result->status); ?></div>
 	<?php
 	
 		}
 		
 	}
 	
 	$count = 1;
 foreach ($search_results as $result)
 	{
 		
 		if(strtolower($result->servicetype) == "repairs")
 		{
         if($count ==1) {	?>
 	<h2><?=ucfirst($result->servicetype); ?></h2><?php $count++ ; }?>
 	<div> <span style="font-weight: bold"><?=$this->lang->line('CNC_manage_servicedate')?></span>
 	<?=$result->date ?><br/> <span style="font-weight: bold"><?=$this->lang->line('CNC_select_details')?></span> <?=ucfirst($result->details); ?><br/><span style="font-weight: bold"><?=$this->lang->line('CNC_select_status')?></span> <?=ucfirst($result->status); ?></div>
 	<?php
 		}
 		$count++ ;
 	}
 $count = 1;
 foreach ($search_results as $result)
 	{
 		if(strtolower($result->servicetype) == "carpenter")
 		{
         if($count ==1) {	?>
 	<h2><?=ucfirst($result->servicetype); ?></h2><?php $count++ ; }?>
 	<div> <span style="font-weight: bold"><?=$this->lang->line('CNC_manage_servicedate')?></span>
 	<?=$result->date ?><br/> <span style="font-weight: bold"><?=$this->lang->line('CNC_select_details')?></span> <?=ucfirst($result->details); ?><br/><span style="font-weight: bold"><?=$this->lang->line('CNC_select_status')?></span> <?=ucfirst($result->status); ?></div>
 	<?php
 		}
 	}
 $count = 1;
 foreach ($search_results as $result)
 	{
 		if(strtolower($result->servicetype) == "electrician")
 		{
         if($count ==1) {	?>
 	<h2><?=ucfirst($result->servicetype); ?></h2><?php $count++ ; }?>
 	<div> <span style="font-weight: bold"><?=$this->lang->line('CNC_manage_servicedate')?></span>
 	<?=$result->date ?><br/> <span style="font-weight: bold"><?=$this->lang->line('CNC_select_details')?></span> <?=ucfirst($result->details); ?><br/><span style="font-weight: bold"><?=$this->lang->line('CNC_select_status')?></span> <?=ucfirst($result->status); ?></div>
 	<?php
 		}
 	}
 }
 else
 {
 	echo "<fotn>".$this->lang->line('CNC_no_result')."</font>";
 }
?>




